package flex.cc.common.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Description:
 * Date:2021年7月22日 下午8:44:25
 * Author:PuJianMeng
 * Copyright (C) 2019 鹏达金融
 */
@Component
@PropertySource("classpath:application.yml")
public class OpenApiConf {
	// 鹏达公钥
	public static String PD_PublicKey;
	public static String domain;
	// 认证信息
	public static String Authorization;
	// 业务商公钥和私钥，  通过OpenApiUtil 生成，生成后将公钥给予鹏达
	public static String SC_PublicKey;
	public static String SC_PrivateKy;
	public static String PARTNERCODE;
	public static String CLIENTID;

	@Value("${api.config.pdPublicKey}")
	public void setPD_PublicKey(String pdPublicKey) {
		PD_PublicKey = pdPublicKey;
	}
	@Value("${api.config.pdDomain}")
	public void setDomain(String pdDomain) {
		OpenApiConf.domain = pdDomain;
	}
	@Value("${api.config.pdAuthorization}")
	public void setAuthorization(String pdAuthorization) {
		Authorization = pdAuthorization;
	}
	@Value("${api.config.scPublicKey}")
	public void setSC_PublicKey(String scPublicKey) {
		SC_PublicKey = scPublicKey;
	}
	@Value("${api.config.scPrivateKey}")
	public void setSC_PrivateKy(String scPrivateKey) {
		SC_PrivateKy = scPrivateKey;
	}
	@Value("${api.config.partnercode}")
	public void setPARTNERCODE(String partnercode) {
		PARTNERCODE = partnercode;
	}
	@Value("${api.config.clientid}")
	public void setCLIENTID(String clientid) {
		CLIENTID = clientid;
	}
}
